package cn.zn.modules.pz.enums;

import lombok.Getter;

@Getter
public enum PayTypeEnum {
    PT_001("001", "财政直接支付"),
    PT_002("002", "零余额账户（授权支付）"),
    PT_003("003", "中国银行9837户"),
    PT_004("004", "中原银行1401户"),
    PT_005("005", "农业银行0565户"),
    PT_006("006", "一卡通中行38户"),
    PT_011("011", "现金"),
    PT_012("012", "其他"),
    ;

    private String code;
    private String name;

    PayTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static PayTypeEnum findByCode(String code) {
        for (PayTypeEnum e : values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }
}
